package com.stroke.tools.animation;

import java.util.Comparator;

/**
 * Author: Igor Bubelov
 * Date: 3/13/11 12:16 PM
 */
public class FramePositionComparator implements Comparator<Frame> {
    public int compare(Frame f1, Frame f2) {
        int p1 = f1.getPosition();
        int p2 = f2.getPosition();

        if (p1 > p2) {
            return 1;
        } else if (p1 < p2) {
            return -1;
        } else {
            return 0;
        }
    }
}